package com.supermarket.shop.system.service.impl;

import com.supermarket.shop.system.dao.VipDao;
import com.supermarket.shop.system.dao.impl.VipDaoImpl;
import com.supermarket.shop.system.domain.Vip;
import com.supermarket.shop.system.service.ServiceVip;

import java.io.IOException;
import java.util.ArrayList;

public class ServiceVipImpl implements ServiceVip {
    VipDao vipDaoImpl=new VipDaoImpl();

    @Override
    public ArrayList<Vip> BufferedReaderFile() throws IOException {
        return vipDaoImpl.BufferedReaderFile();
    }

    @Override
    public void BufferedWriterFile(Vip vip) throws IOException {
        vipDaoImpl.BufferedWriterFile(vip);
    }

    @Override
    public boolean isExist(String name) throws IOException {
        return vipDaoImpl.isExist(name);
    }

    @Override
    public Integer maxCommodityId() throws IOException {
        return vipDaoImpl.maxCommodityId();
    }

    @Override
    public boolean addVip(Vip vip) throws IOException {
        return vipDaoImpl.addVip(vip);
    }

    @Override
    public void findAllVip() throws IOException {
        vipDaoImpl.findAllVip();
    }

    @Override
    public void deleteVipByName(String name) throws IOException {
        vipDaoImpl.deleteVipByName(name);
    }

    @Override
    public void updateVipByname(Vip vip, String nameupdate) throws IOException {
        vipDaoImpl.updateVipByname(vip,nameupdate);
    }
}
